<?php

class StudentFormStep3 extends Form
{
	const L_FIELD_REQUIRED = 'Dit veld is verplicht';

	public function __construct( $data = array() )
	{
		parent::__construct( );
		
		$vezData = new FieldSet( 'Verzekeringsgegevens' );
		
		$vezData->addChild( new PlainText( 'Onderstaande gegevens alleen invullen indien er een stage in het buitenland van toepassing is.' ) );
		
		$vez_zv = new InputText( 'vez_ziektekostenverzekeraar', Student::getField('vez_ziektekostenverzekeraar'), isset( $data[ 'vez_ziektekostenverzekeraar' ] ) ? $data[ 'vez_ziektekostenverzekeraar' ] : '', 'street' );
		//$vez_zv->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_zv );
		
		$vez_zv_no = new InputText( 'vez_ziektekostenverzekeraar_nr', Student::getField('vez_ziektekostenverzekeraar_nr'), isset( $data[ 'vez_ziektekostenverzekeraar_nr' ] ) ? $data[ 'vez_ziektekostenverzekeraar_nr' ] : '', 'street' );
		//$vez_zv_no->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_zv_no );
		
		$vez_ong = new InputText( 'vez_ongeval', Student::getField('vez_ongeval'), isset( $data[ 'vez_ongeval' ] ) ? $data[ 'vez_ongeval' ] : '', 'street' );
		//$vez_ong->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_ong );
		
		$vez_ong_no = new InputText( 'vez_ongeval_nr', Student::getField('vez_ongeval_nr'), isset( $data[ 'vez_ongeval_nr' ] ) ? $data[ 'vez_ongeval_nr' ] : '', 'street' );
		//$vez_ong_no->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_ong_no );
		
		$vez_rep = new InputText( 'vez_repatriering', Student::getField('vez_repatriering'), isset( $data[ 'vez_repatriering' ] ) ? $data[ 'vez_repatriering' ] : '', 'street' );
		//$vez_rep->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_rep );
		
		$vez_rep_no = new InputText( 'vez_repatriering_nr', Student::getField('vez_repatriering_nr'), isset( $data[ 'vez_repatriering_nr' ] ) ? $data[ 'vez_repatriering_nr' ] : '', 'street' );
		//$vez_rep_no->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_rep_no );
		
		$vez_wa = new InputText( 'vez_wa', Student::getField('vez_wa'), isset( $data[ 'vez_wa' ] ) ? $data[ 'vez_wa' ] : '', 'street' );
		//$vez_wa->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_wa );
		
		$vez_wa_no = new InputText( 'vez_wa_nr', Student::getField('vez_wa_nr'), isset( $data[ 'vez_wa_nr' ] ) ? $data[ 'vez_wa_nr' ] : '', 'street' );
		//$vez_wa_no->getValidator()->required( self::L_FIELD_REQUIRED );
		$vezData->addChild( $vez_wa_no );
		
		$this->addChild( $vezData );
		
		$this->addChild( new SubmitButton( 'previous', 'Stap terug' ) );
		$this->addChild( new SubmitButton( 'submit', 'Toevoegen' ) );
	}
}
